<?php
/**
 * XGPHP 轻量级PHP框架
 * @link http://xgphp.xg3.cn
 * @version 2.0.0
 * @license http://www.apache.org/licenses/LICENSE-2.0
 * @author 讯高科技 <xungaokeji@qq.com>
*/
namespace xg\facade;
class Response extends \xg\Facade {
	public static function __callStatic($method, $params) {
		if(in_array($method,['error','success','message','result'])){
			$drive = 'result';
		}elseif($method=='redirect'){
			$drive = $method;
		}else{
			$drive = $method;
			$method = 'content';
		}
		$instance = \xg\Response::drive($drive);
		App::set('response',$instance);
		return call_user_func_array([$instance, $method], $params);
	}
}
?>